package com.weishao.common.pojo;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import org.springframework.jdbc.support.JdbcUtils;
import lombok.Data;

/**
 * JDBC连接及结果集实体参数定义类
 * 
 * @author tang
 *
 */
@Data
public class StatementResultSet {
	private Connection connection;
	private Statement statement;
	private ResultSet resultset;

	public void close() {
		JdbcUtils.closeResultSet(resultset);
		JdbcUtils.closeStatement(statement);
		JdbcUtils.closeConnection(connection);
	}
}
